<template>
  <div class="page-header">
    <div class="header-left">
      <img src="@/assets/images/logo_origin.svg" alt="天威线材" class="header-logo">
      <h1>{{ title }} <span class="subtitle">Mini MES 系统</span></h1>
    </div>
    <div class="header-right">
      <slot name="actions"></slot>
    </div>
  </div>
</template>

<script setup>
defineProps({
  title: {
    type: String,
    required: true
  }
})
</script>

<style scoped>
/*上、右、下、左 16px 240px 16px 20px;*/
/*上下、左右*/
.page-header {
  background-color: #fff;
  padding: 16px 80px 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.header-left {
  display: flex;
  align-items: center;
}

.header-logo {
  height: 36px;
  margin-right: 15px;
}

.page-header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #303133;
  display: flex;
  align-items: center;
}

.subtitle {
  font-size: 0.9rem;
  color: #909399;
  margin-left: 10px;
  font-weight: normal;
  background-color: #f0f2f5;
  padding: 2px 8px;
  border-radius: 4px;
}

.header-right {
  display: flex;
  align-items: center;
}
</style>
